home *** CD-ROM | disk | FTP | other *** search
- /*
- Visual FX Arexx Script
- Written By J.L. White
- (C)1997 Merlin's Software
- */
-
- Options Results
- address "IMAGEFX.1"
- ScreenToFront
- Undo Off
- if exists("libs:flyer.library") then do
- TOASTERLIB="ToasterARexx.port"
- call remlib('ToasterARexx.port')
- call remlib('PROJECT_REXX_PORT')
- call addlib('PROJECT_REXX_PORT' , 0)
- call addlib(TOASTERLIB,0)
- end
- call Settings()
- call open TempFile,"VFXIFX:TempDrawer/"FXNum".txt",R
- line = readln(TempFile)
- PicAName = strip(line)
- line = readln(TempFile)
- Start = strip(line)
- line = readln(TempFile)
- End = strip(line)
- line = readln(TempFile)
- IAType = strip(line)
- line = readln(TempFile)
- Color = strip(line)
- line = readln(TempFile)
- BorderType = strip(line)
- line = readln(TempFile)
- Border = strip(line)
- line = readln(TempFile)
- ShadowType = strip(line)
- line = readln(TempFile)
- Type2 = strip(line)
- line = readln(TempFile)
- WindowType = strip(line)
- line = readln(TempFile)
- CropAnswer = strip(line)
- line = readln(TempFile)
- BrushName = strip(line)
- line = readln(TempFile)
- ScrollXOff = strip(line)
- line = readln(TempFile)
- ScrollYOff = strip(line)
- call close TempFile
-
- Frames = (End - Start)+1
- j=0
- k=0
- TFrames = Frames
- TNum = 3
- if TFrames > 999 then TNum = 4
- if TFrames > 9999 then TNum = 5
- if Field = 1 then TFrames = Frames*2
- do i = Start to End
- k = k+ 1
- call open TempFile,"RAM:VFXNums",W
- call writeln TempFile,right(k,5,'0')
- call writeln TempFile,right(Frames,5,'0')
- call close TempFile
- f=0
- Redraw Off
- j = j+ 1
- FieldSet = 0
- call DoIt()
- Redraw On
- call SaveIt()
- if Field = 1 then do
- Redraw Off
- j = j + 1
- FieldSet = 1
- call DoIt()
- Redraw On
- call SaveIt()
- end
- end
- Undo On
- exit
-
-
-
- LoadA:
- if (POS('FLY_1',SHOW('Ports')) = 0) then do
- Undo On
- exit
- end
- if IAType = 0 then do
- LoadBuffer PicAName Force i
- if Field = 1 then do
- GetMain
- parse var result Name Width Height Blah
- if FieldSet = 0 then do
- Hook DeInterlace
- Scale Width Height
- end
- if FieldSet = 1 then do
- Hook DeInterlace
- Swap
- Scale Width Height
- end
- end
- end
- if IAType = 1 then do
- LoadBuffer PicAName Force 1
- end
- if IAType = 2 then do
- LoadBuffer PicAName Force
- end
- if IAType = 3 then do
- LoadBuffer PicAName""right(i,TNum,'0') Force
- end
- return
-
-
- SaveIt:
- if (POS('FLY_1',SHOW('Ports')) = 0) then do
- Undo On
- exit
- end
- if SaveType = 0 then do
- call Switcher(TOSW)
- call Switcher(MDV1)
-
- Render Go
- if Field = 1 then
- call RecordAdd(SaveName,1,6,Compression)
- else
- call RecordAdd(SaveName,2,6,Compression)
- if j = TFrames then
- call MakeIcon(SaveName,(Frames-10))
- end
-
- if SaveType = 1 then do
- if Field = 1 then do
- f= f + 1
- if f = 1 then
- SaveBufferAs ILBM "VFXIFX:TempDrawer/PicA"
- if f = 2 then do
- GetMain
- parse var result Name Width Height Blah
- Scale Width Height/2
- Swap
- LoadBuffer "VFXIFX:TempDrawer/PicA" Force
- Scale Width Height/2
- Hook Interlace
- SaveBufferAs ILBM SaveName""right(k,TNum,'0')
- f = 0
- end
- end
- else do
- SaveBufferAs ILBM SaveName""right(k,TNum,'0')
- end
- end
-
- return
-
-
- DoIt:
- if (POS('FLY_1',SHOW('Ports')) = 0) then do
- Undo On
- exit
- end
- call LoadA()
- GetMain
- parse var result Name Width Height Blah
- if CropAnswer ~= "None" then do
- CropAnswer
- Scale Width Height
- end
-
- A = trunc(Width/10)+12
- B = trunc(Height/10)+12
- C = trunc(Width - (A*2))
- D = trunc(Height - (B*2))
- XOff = 12
- YOff = 10
- Blend 100
- if WindowType > -1 then do
- parse var WindowType A B C D
- XOff = 0
- YOff = 0
- end
- Scissors
- Region Brush
- Box 0 0 Width Height
- Region Full
- if Type2 = 0 then do
- ColorToGrey 299 587 114
- Grey2Color
- end
- if Type2 = 1 then do
- ReliefMap 256 0
- end
- if Type2 = 2 then do
- ColorToGrey 299 587 114
- Grey2Color
- Hook "Hooks/Sys/Antique"
- end
- if Type2 = 3 then do
- Solarize
- end
- if Type2 = 4 then do
- Negative
- end
- if Type2 = 5 then do
- Posterize 3
- end
- if Type2 = 6 then do
- FalseColor Standard
- end
- if Type2 = 7 then do
- DrawMode Lighten
- FilledBox 0 0 Width Height
- FilledBox 0 0 Width Height
- DrawMode Normal
- end
- if Type2 = 8 then do
- DrawMode Darken
- FilledBox 0 0 Width Height
- FilledBox 0 0 Width Height
- DrawMode Normal
- end
-
- if ShadowType = 0 then
- EdgeMode FeatherOut 5
- if ShadowType < 2 then do
- DrawMode Darken
- FillMode Solid 0 0 0 Smooth
- FilledBox A+12 B+10 C D
- EdgeMode Normal
-
- DrawMode Normal
- FillMode Warp 0 0 0 Smooth
- FilledBox A B C D
- end
- else do
- DrawMode Normal
- FillMode Warp 0 0 0 Smooth
- FilledBox A B C D
- end
-
- KillBrush
- if BorderType = 0 then do
- if Border > 0 then do
- Pen 0 Border
- Grid 0 0 0 0 OFF
- Transparency 0 0 0
- ActiveColor Color
- if ShadowType < 2 then
- Box A B C D
- else
- Box A B C+XOff D+YOff
- Pen 0 1
- ActiveColor 1
- end
- end
-
-
-
- if BorderType = 1 then do
- if j = 1 then do
- LoadBrush BrushName
- SaveBrushAs ILBM "VFXIFX:TempDrawer/BrushA"
- end
- if j > 1 then do
- LoadBrush "VFXIFX:TempDrawer/BrushA"
- Roll ScrollXOff ScrollYOff
- SaveBrushAs ILBM "VFXIFX:TempDrawer/BrushA"
- end
- FillMode Tile 0 0 0 Smooth
- Depth = Border
- Blend 100
- NewArea
- DrawMode Normal
- C = C + A
- D = D + B
- AddArea A+1 B
- AddArea C B
- AddArea C-Depth+1 B+Depth-1
- AddArea A+Depth B+Depth-1
- AddArea A+1 B
- FilledPoly
-
- NewArea
- AddArea A B
- AddArea A+Depth-1 B+Depth-1
- AddArea A+Depth-1 D-Depth+1
- AddArea A D
- AddArea A B
- FilledPoly
-
- NewArea
- AddArea C-Depth+1 B+Depth
- AddArea C B+1
- AddArea C D
- AddArea C-Depth+1 D-Depth+1
- AddArea C-Depth+1 B+Depth
- FilledPoly
-
- NewArea
- AddArea C-1 D
- AddArea A+1 D
- AddArea A+Depth D-Depth+1
- AddArea C-Depth D-Depth+1
- AddArea C-1 D
- FilledPoly
-
- C = C - A
- D = D - B
- end
-
- KillBrush
- FillMode Solid 0 0 0 Smooth
-
- if BorderType > 0 then do
- Depth = Border
- Blend 90
- NewArea
- DrawMode Lighten
- C = C + A
- D = D + B
- AddArea A+1 B
- AddArea C B
- AddArea C-Depth+1 B+Depth-1
- AddArea A+Depth B+Depth-1
- AddArea A+1 B
- FilledPoly
-
- NewArea
- DrawMode Lighten
- AddArea A B
- AddArea A+Depth-1 B+Depth-1
- AddArea A+Depth-1 D-Depth+1
- AddArea A D
- AddArea A B
- FilledPoly
- FilledPoly
-
- Blend 70
- NewArea
- DrawMode Darken
- AddArea C-Depth+1 B+Depth
- AddArea C B+1
- AddArea C D
- AddArea C-Depth+1 D-Depth+1
- AddArea C-Depth+1 B+Depth
- FilledPoly
-
- NewArea
- DrawMode Darken
- AddArea C-1 D
- AddArea A+1 D
- AddArea A+Depth D-Depth+1
- AddArea C-Depth D-Depth+1
- AddArea C-1 D
- FilledPoly
- FilledPoly
- end
- Blend 100
- FillMode Solid 0 0 0 Smooth
- DrawMode Normal
- return
-
-
-